package com.cat.service.impl;

import com.cat.dao.OrdersDao;
import com.cat.pojo.Orders;
import com.cat.service.orderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class OrderServiceImpl implements orderService {
    @Autowired
    private OrdersDao ordersDao;

    @Override
    public boolean saveOrders(Orders orders) {
        return ordersDao.saveOrders(orders)>0;
    }

    @Override
    public List<Orders> getOrdersByCid(int id) {
        return ordersDao.getOrdersByCid(id);
    }

    @Override
    public boolean delete(int oid) {
        return ordersDao.delete(oid)>0;
    }
}
